import { getStream } from '../Core/connect'
import { Extrusion } from './Extrusion'
import { Material } from '../Material/Material'

export class Water extends Extrusion {
    readonly type: string
    constructor(name: string, baseHeight: number = 0, targetHeight: number = 2000) {
        super(name, baseHeight, targetHeight)
        this.type = 'Water'
    }
    // 更新水面颜色
    replaceWaterMaterial(Material:Material) {
        const stream = getStream()
        const str = {extrusionFunction: 'replaceWaterMaterial', ids: `${this.uuid}`, Material:Material}
        stream.emitUIInteraction(str)
    }
    // 设置水面颜色
    setWaterMaterial(Material:Material) {
        debugger
        const stream = getStream()
        const str = {extrusionFunction: 'setWaterMaterial', ids: `${this.uuid}`, Material:Material}
        stream.emitUIInteraction(str)
    }
}

